package com.ssn.template.software;

public abstract class SoftWare {
    private Account account;
    private double interest;
    public void process(Account account){
        setAccount(account);
        interest = calculate(account);
        show();
    }

    public void setAccount(Account account) {
        this.account = account;
    }

    public Account getAccount() {
        return account;
    }

    public abstract double calculate(Account account);
    public void show(){
        System.out.println("利息为：" + interest);
    }
}
